home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-09-03 | 3.2 KB | 126 lines | [TEXT/MPS ] |
- #
- # File: USBDDKBuildDriver
- #
- # Contains: Rules to invoke build of individual drivers.
- #
- # Version: xxx put version here xxx
- #
- # Copyright: © 1996-1998 by Apple Computer, Inc., all rights reserved.
- #
-
- # this save/copy/restore of the USB environment variables is required so that
- # the USB team can have both the USB build environment and the USB DDK
- # build environment installed
-
- set -e USBTargetsTemp "{USBTargets}"
- set -e USBTargets "{USBDDKTargets}"
-
- set -e USBObjectsTemp "{USBObjects}"
- set -e USBObjects "{USBDDKObjects}"
-
- set -e USBLibrariesTemp "{USBLibraries}"
- set -e USBLibraries "{USBDDKLibraries}"
-
- set -e USBBuildResultsTemp "{USBBuildResults}"
- set -e USBBuildResults "{USBDDKTargets}"
-
- set -e USBReleaseExtensionsTemp "{USBReleaseExtensions}"
- set -e USBReleaseExtensions "{USBDDKReleaseExtensions}"
-
- set -e USBMapDirTemp "{USBMapDir}"
- set -e USBMapDir "{USBDDKMapDir}"
-
- set -e StubLibsDirTemp "{StubLibsDir}"
- set -e StubLibsDir "{USBDDKLibraries}"
-
- set -e USBInterfacesInternalTemp "{USBInterfacesInternal}"
- set -e USBInterfacesInternal "{USBDDKInterfacesInternal}"
-
- set -e USBInterfacesExternalTemp "{USBInterfacesExternal}"
- set -e USBInterfacesExternal "{USBDDKInterfacesExternal}"
-
- unset USBInterfacesPrivate
-
- Set t1 `Date -n`
- Set t0 "`Date -s`"
-
- (Evaluate "`Directory`" =~ /≈':'≈':'(≈)®1':'/) ∑ dev:null
-
- Echo "#******************************************************************************************************"
- Echo "# Building Driver: {®1}"
- echo "# "{t0}
-
- If `Exists "{USBDDKDriver}".make` == ''
- Echo "# The current directory is: "`Directory`;
- Echo "# This directory has no Makefile. Please set the directory to the driver directory"
- Echo "# you wish to build by selecting one of the drivers listed in the USBDDK menu."
- Else
- if {1} == 'clean'
- set echo 0
- set exit 1
- Make -f {USBDDKDriver}.make clean > make.build
-
- set echo 0
- set exit 1
- make.build || (Beep; set echo 0; Exit 1)
-
- set echo 0
- set exit 1
- Make -f {USBDDKDriver}.make > make.build
-
- set exit 1
- set echo 1
- make.build || (Beep; set echo 0; Exit 1)
-
- set echo 0
- set exit 1
- else
- set echo 0
- set exit 1
- if {1} == 'full'
- Make -f {USBDDKDriver}.make -e > make.build
- else
- Make -f {USBDDKDriver}.make> make.build
- End
-
- set exit 1
- set echo 1
- make.build || (Beep; set echo 0; Exit 1)
-
- set echo 0
- set exit 1
- End
- End
- #End
-
- Set t2 `Date -n`
- Set t3 "`Date -s`"
-
- echo "# Started: "{t0}
- echo "# Completed: "{t3}
- echo "#"
-
- Set t `Evaluate {t2} - {t1}`
- If {t} > 1
- Echo "# Time to build driver: {t} seconds."
- Else
- Echo "# Time to build driver: less than 1 second"
- End
- Echo "#******************************************************************************************************"
-
- Delete -i Make.build
-
- set -e USBTargets "{USBTargetsTemp}"
- set -e USBObjects "{USBObjectsTemp}"
- set -e USBRIncludes "{USBRIncludesTemp}"
- set -e USBLibraries "{USBLibrariesTemp}"
- set -e USBBuildResults "{USBBuildResultsTemp}"
- set -e USBReleaseExtensions "{USBReleaseExtensionsTemp}"
- set -e USBMapDir "{USBMapDirTemp}"
-
- set -e USBInterfacesInternal "{USBInterfacesInternalTemp}"
- set -e USBInterfacesExternal "{USBInterfacesExternalTemp}"
- set -e USBInterfacesPrivate "{USBInterfacesPrivateTemp}"
-
- set -e StubLibsDir "{StubLibsDirTemp}"
-